package com.zhang.authoritycenter.controller.white;


import com.zhang.infrastructure.model.KingHoodResponseVO;
import com.zhang.redis.util.RedisManager;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2023-12-13 20:08
 **/
@RequiredArgsConstructor
@Slf4j
@RequestMapping("/white")
@RestController
public class WhiteController {

    private final RedisManager redisManager;


    @PostMapping("/delete/{key}")
    public KingHoodResponseVO delete(@PathVariable("key") String key) {
        Boolean delete = redisManager.delete(key);
        return KingHoodResponseVO.success(delete);
    }
}
